<template>
  <div>
    <div class="name">{{ title }}</div>
    <div class="topBox">
      <div
        class="topOne"
        v-for="(item,i) in dataList"
        :key="i"
      >
        <div class="left">
          <img
            src="./image/TOP1.svg"
            class="medal"
          >
          <div class="name">{{item.name}}</div>
        </div>
        <div class="num"><span style="font-size:12px">￥</span>{{item.num}}</div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      title: String,
      type: String,
      dataList: {
        type: Array,
        default: () => [
          {
            name: '任务1',
            num: '3.00'
          },
          {
            name: '任务2',
            num: '3.00'
          },
          {
            name: '任务3',
            num: '3.00'
          }
        ]
      }
    }
  }
</script>

<style lang="scss" rel="stylesheet/scss">
.name {
  font-size: 16px;
  font-family: PingFang SC, PingFang SC-Semibold;
  font-weight: 600;
  text-align: LEFT;
  color: #333333;
  line-height: 40px;
  margin-left: 15px;
}
.topBox {
  padding: 0 10px;
}
.topOne {
  width: 100%;
  display: flex;
  justify-content: space-between;
  height: 50px;
  background: -webkit-linear-gradient(left, #f5f6f8, #fff 100%);
  background: linear-gradient(90deg, #f5f6f8, #fff 100%);
  border-radius: 8px;
  margin: 10px auto;
  padding: 0 20px;
  // position: relative;
  .left {
    display: flex;
    align-items: center;
  }
  .medal {
    // position: absolute;
    width: 27px;
    // margin-top: 10px;
    // margin-left: 11px;
  }
  .name {
    // position: absolute;
    margin-left: 5px;
    // margin-top: 14px;
    font-size: 16px;
    font-family: PingFang SC, PingFang SC-Light;
    font-weight: 300;
    // text-align: center;
    color: #333;
    // line-height: 18px;
  }
  .num {
    // position: absolute;
    margin-top: 16px;
    // margin-left: 237px;
    font-size: 20px;
    font-family: Oxanium, Oxanium-Bold;
    font-weight: 700;
    text-align: RIGHT;
    color: #333;
    line-height: 20px;
  }
}
</style>
